package com.green.common.fusionchart.utils;

import java.util.ArrayList;
import java.util.List;

import com.green.common.fusionchart.Apply;
import com.green.common.fusionchart.FontStyle;
import com.green.common.fusionchart.Style;
import com.green.common.fusionchart.enums.ToObjectEnum;

public class DefaultHelper {
	public static List<Style> getDefaultStyles() {
		List<Style> styles = new ArrayList<Style>();
		FontStyle font = new FontStyle();
		font.setName("caption");
		font.setSize(18);
		font.setColor("000000");
		font.setFont("黑体");

		FontStyle dataStyle = new FontStyle();
		dataStyle.setName("dataValue");
		dataStyle.setBold(true);

		styles.add(font);
		styles.add(dataStyle);

		return styles;
	}

	public static List<Apply> getDefaultApply() {

		List<Apply> applys = new ArrayList<Apply>();
		Apply caption = new Apply();
		caption.setToObject(ToObjectEnum.CAPTION);
		caption.setStyles(getCaptionDefaultStyle());
		applys.add(caption);

		Apply dataValue = new Apply();
		dataValue.setToObject(ToObjectEnum.DATAVALUES);
		dataValue.setStyles(getDataValueDefaultStyle());
		applys.add(dataValue);

		return applys;
	}

	public static Style getCaptionDefaultStyle() {
		FontStyle font = new FontStyle();
		font.setName("caption");
		return font;
	}

	public static Style getDataValueDefaultStyle() {
		FontStyle dataStyle = new FontStyle();
		dataStyle.setName("dataValue");
		return dataStyle;
	}
}
